from selenium.webdriver.common.by import By

class UserSecuritySettingsLocator:
    # preferences菜单
    preferences_menu = (By.XPATH, '//div[contains(@data-menu-id,"PREFERENCE_CST")]/span[1]')
    # 判断preferences菜单是否打开
    if_preferences_menu_open = (By.XPATH, '//div[contains(@data-menu-id,"PREFERENCE_CST")]/../ul')

    # Security Settings菜单
    security_settings_menu = (By.XPATH, '//*[text()="Security Setting"]/..')
    # 页面title
    security_settings_title = (By.CSS_SELECTOR, 'div.antd4-space-item[style] div')
    # change password 字段
    #change_password = (By.XPATH, '(//div[contains(@class,"property-display-title")])[2]')
    change_password = (By.XPATH, '//*[text()="Change Password"]')

    # email字段
    Authentication = (By.XPATH, '(//div[contains(@class,"property-display-title")])[3]')
    # contacts list字段
    contact_list = (By.XPATH, '(//div[contains(@class,"titleText")])[1]')
    # contacts list的setting按钮
    contacts_list_setting = (By.CSS_SELECTOR, "div.setting___2yvI1")


    # 修改密码按钮
    change_password_botton = (By.XPATH, '//span[text() = "Change"]')
    # old password输入
    old_password_input =(By.ID, 'currentPassword')
    # 新密码输入
    new_password_input = (By.XPATH, "//input[contains(@placeholder,'Enter your new password')]")

    #新密码确认
    new_password_confirm_input = (By.ID, 'confirmPassword')
    #confirm按钮
    confirm_botton0 = (By.XPATH,  '//span[text() = "Confirm"]')


    #忘记密码按钮
    forget_password_botton = (By.XPATH, '(//div[contains(@class,"antd4-space-item")])[4]')
    # verification code输入
    verification_code_input = (By.ID, 'creForm_verifyCode')

    #新密码确认输入
    new_password_input1 = (By.XPATH, "//input[contains(@placeholder,'Enter your new password')]")
    #新密码确认
    new_password_confirm_input1 = (By.ID, 'creForm_confirmPassword')
    # OK按钮
    ok_botton = (By.XPATH, '//span[text() = "OK"]')

    #登录认证按钮
    login_Authentication_botton = (By.XPATH, '(//div[contains(@class,"antd4-switch-handle")])[1]')

    # 已知晓勾选框
    I_acknowledge = (By.XPATH, "(//span[contains(@class,'security-setting-confirm')])[1]")



    #头像
    avator_botton = (By.XPATH, '(//div[contains(@class,"avatars")])[1]')
    #登出按钮
    login_out_botton = (By.XPATH, '//span[text() = "Log Out"]')




